package com.traffic.api.jedis.running;

import org.apache.log4j.Logger;

import com.traffic.api.jedis.Redis;
import com.traffic.api.util.DictConstantKeys;
import com.traffic.api.util.OrderUtils;
import com.traffic.managent.service.order.bean.OrderBean;

public class ApiOrderAcceptExecutor implements OrderUtils {

	private static Logger logger = Logger.getLogger(ApiOrderAcceptExecutor.class);

	public final static ApiOrderAcceptExecutor service = new ApiOrderAcceptExecutor();

	public void setOrder(OrderBean order) {
		// 注意redis的rpush与lpush的区别

		Redis.use(DictConstantKeys.redis_order_name).rpush(OrderUtils.ORDER_LIST, order);
		logger.info("ApiOrderAcceptExecutor set to redis order id:" + order.getIds() + ",phoneNo:" + order.getPhoneNo()+"successful!!!" );
	}

}
